<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateActicitiesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('activities', function (Blueprint $table) {
            $table->id();
            $table->string('title')->nullable()->comment('活动标题');
            $table->string('image')->nullable()->comment('图片');
            $table->text('desc')->nullable()->comment('活动详情');
            $table->dateTime('acticity_started_at')->comment('活动开始时间');
            $table->dateTime('acticity_ended_at')->comment('活动结束时间');
            $table->integer('quantity')->default(0)->comment('每人可兑换数量');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('activities');
    }
}
